<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .pic {
            width: 300px;
            position: relative;
        }

        .fl {
            float: left;
        }

        img {
            width: 300px;
            height: 100px;
        }

        .img {
            width: 300px;
            height: 100px;
            overflow: hidden;
        }

        button {
            position: absolute;
            color: #fff;
            cursor: pointer;
            border: none;
            width: 25px;
            height: 30px;
            background-color: rgba(0, 0, 0, 0.3);
           
            top: 40%
        }

        .leftBtn {
            left: 0px;
        }

        .rightBtn {
            right: 0px;
        }
    </style>
</head>
<div class="pic fl">
    <div class="img">
        <ul class="imgUl" style="position: relative;top:0px;left:0px;">
            <li><img src="D:\新建文件夹\image\94.png" alt=""></li>
            <li><img src="D:\新建文件夹\image\95.png" alt=""></li>
            <li><img src="D:\新建文件夹\image\96.png" alt=""></li>
            <li><img src="D:\新建文件夹\image\97.png" alt=""></li>
            <li><img src="D:\新建文件夹\image\98.png" alt=""></li>
        </ul>
    </div>
    <button class="iconfont leftBtn">&#xe68b;</button>
    <button class="iconfont rightBtn">&#xe606;</button>
    <div class="circle">
        <span class="active"></span><span></span><span></span><span></span><span></span>
    </div>
    <div class="demo">


    </div>

    <body>
        <script>
            var ul = document.getElementsByTagName("ul")[0];
            setInterval(function () {
                var top = parseInt(ul.style.top);
                console.log(top);
                if (top < -400) {
                    top = 0;
                }
                ul.style.top = top - 104 + "px";
            }, 2000);

        </script>
    </body>

</html>